﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ERPStudio;

namespace ERPForms
{
    public partial class ConfirmareOperatieFrm : FrmRezumat
    {
        public ConfirmareOperatieFrm(ModuleClass mc):base(mc)
        {
            InitializeComponent();
            ActiveControl = parolaTB;
        }

        private void ConfirmareOperatieFrm_Load(object sender, EventArgs e)
        {
            AddButton("Confirmare[F9]", global::ERPStudio.Properties.Resources._001_01, Confirmare, ToolStripItemAlignment.Right, false);
            //DialogResult = System.Windows.Forms.DialogResult.Cancel;
            HandleSalvare += Confirmare;
        }

        private void Confirmare(object sender, EventArgs e)
        {
            if (parolaTB.Text == String.Empty)
                return;
            String paroladeAzi = "L" + DateTime.Now.Month.ToString() + "Z" + DateTime.Now.Day.ToString();
            if (paroladeAzi == parolaTB.Text)
            {
                DialogResult = System.Windows.Forms.DialogResult.OK;
                Close();
            }
        }
    }
}
